package com.yy.pojo;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Course {
    private String[] courseName;
    private List<Float> credits;

    public void show() {
        for (String s : courseName) {
            for (Float credit : credits) {
                System.out.println(s + "的学分是:" + credit);
            }
        }
    }

    public Course() {
    }

    @Override
    public String toString() {
        return "Course{" +
                "courseName=" + Arrays.toString(courseName) +
                ", credits=" + credits +
                '}';
    }

    public Course(String[] courseName, List<Float> credits) {
        this.courseName = courseName;
        this.credits = credits;
    }

    public String[] getCourseName() {
        return courseName;
    }

    public void setCourseName(String[] courseName) {
        this.courseName = courseName;
    }

    public List<Float> getCredits() {
        return credits;
    }

    public void setCredits(List<Float> credits) {
        this.credits = credits;
    }
}
